package middleware

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"niu-video/pkg/logger"
)

func Logger() gin.HandlerFunc {
	return func(context *gin.Context) {
		host := context.Request.Host
		url := context.Request.URL
		logger.Info(fmt.Sprintf("\t %s \t %v", host, url))
		context.Next()
	}
}
